<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>添加系统管理员 - Powered By Betou</title>
<meta name="author" content="Betou Team" />
<meta name="copyright" content="Betou" />
<#include "../../head.html"/>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	
	// 表单验证
	$inputForm.validate({
		rules: {
			username: {
				required: true,
				pattern: /^[0-9a-z_A-Z\u4e00-\u9fa5]+$/,
				minlength: 2,
				maxlength: 30,
				remote: {
					url: "../v_check_username.jspx"
				}
			},
			password: {
				required: true,
				pattern: /^[^\s&\"<>]+$/,
				minlength: 4,
				maxlength: 20
			},
			rePassword: {
				required: true,
				equalTo: "#password"
			},
			qqService:{digits:true, minlength:5},
			roleIds: "required"
		},
		messages: {
			username: {
				pattern: "非法字符",
				remote: "已存在"
			},
			password: {
				pattern: "非法字符"
			}
		}
		
	});
	
});
</script>
</head>
<body class="content">
	<div class="path">
		<a href="../index.jspx">首页</a> &raquo; 添加系统管理员
	</div>
	<form id="inputForm" action="o_save.jspx" method="post"  >
		<table class="input tabContent">
			<tr>
				<th><span class="requiredField">*</span>登录名:</th>
				<td>
					<input type="text" name="username" class="text" maxlength="30" title="只允许为汉字、字母、英文和下划线的组合" />
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>密码:</th>
				<td>
					<input name="password"  type="password" id="password" class="text" maxlength="100" />
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>确认密码:</th>
				<td>
					<input type="password" name="rePassword"  class="text" maxlength="100"  />
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>角色</th>
				<td>
					<span class="fieldSet">
						<#list roleList as r>
							<label>
								<input type="checkbox" name="roleIds" value="${r.id!}" />${r.name!}
							</label>
						</#list>
					</span>
				</td>
			</tr>
			<tr>
				<th>设置:</th>
				<td>
					<label>
						<input type="checkbox" id="disabled"  name="disabled" value="false"  checked/>是否启用
					</label>
				</td>
			</tr>
			<tr>
				<th>真实姓名:</th>
				<td>
						<input type="text" name="realname" class="text" maxlength="30"  />
				</td>
			</tr>
			<tr>
				<th>联系电话:</th>
				<td>
						<input type="text" name="tel" class="text" maxlength="100"  />
				</td>
			</tr>
			<tr>
				<th>联系手机:</th>
				<td>
						<input type="text" name="contract" class="text" maxlength="100"  />
				</td>
			</tr>
			<tr>
				<th>联系QQ:</th>
				<td>
						<input type="text" name="qqService" class="text" maxlength="15"  />
				</td>
			</tr>
		</table>
		<table class="input">
			<tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="submit" class="button" value="确&nbsp;&nbsp;定" />
					<input type="button" class="button" value="返&nbsp;&nbsp;回" onclick="location.href='v_list.jspx'" />
				</td>
			</tr>
		</table>
	</form>
	<#include "../../footer.html"/>
</body>
</html>
